dde.htmlHTMLudogá[πùΔ¢πùΔ¢ÅÅ„ã Monkeybread Realbasic plugin - Documentation - DDE

MBS Plugin Documentation

This is the documentation for the Realbasic Plugins from Monkeybreadsoftware.de. You find these plugins and the newest version of this document at http://www.monkeybreadsoftware.de/realbasic inside the plugins section.

This help was last updated on Freitag, 6. September 2002 and covers 2136 items: 126 classes, 2 controls and 583 global functions.

The list of the themes Global methods by category Global methods by name The list of the classes The list of the controls

class DDE

class, DDE Mo, 15. Jul 2002
Mac OS Classic: Does nothing. Mac OS Carbon: Does nothing. Windows: Works.
Function: Gives access to Windows DDE functions.
Notes: DDE on Windows is like AppleEvents on Mac OS, but not so comfortable.

CF_BITMAP as integer

property, DDE Mo, 15. Jul 2002
Mac OS Classic: Does nothing. Mac OS Carbon: Does nothing. Windows: Works.
Function: A constant for the format parameter.
Notes: Specifies a Windows bitmap format

CF_DIB as integer

property, DDE Mo, 15. Jul 2002
Mac OS Classic: Does nothing. Mac OS Carbon: Does nothing. Windows: Works.
Function: A constant for the format parameter.
Notes: Specifies the Windows Device Independent Bitmap (DIB) format.

CF_DIBV5 as integer

property, DDE Mo, 15. Jul 2002
Mac OS Classic: Does nothing. Mac OS Carbon: Does nothing. Windows: Works.
Function: A constant for the format parameter.
Notes: Specifies the Windows Device Independent Bitmap (DIB) format of Windows 2000 and newer.

CF_DIF as integer

property, DDE Mo, 15. Jul 2002
Mac OS Classic: Does nothing. Mac OS Carbon: Does nothing. Windows: Works.
Function: A constant for the format parameter.
Notes: Specifies the Windows data interchange format.

CF_ENHMETAFILE as integer

property, DDE Mo, 15. Jul 2002
Mac OS Classic: Does nothing. Mac OS Carbon: Does nothing. Windows: Works.
Function: A constant for the format parameter.
Notes: Specifies the Windows enhanced metafile format.

CF_HDROP as integer

property, DDE Mo, 15. Jul 2002
Mac OS Classic: Does nothing. Mac OS Carbon: Does nothing. Windows: Works.
Function: A constant for the format parameter.
Notes: Specifies the Windows file drop format.

CF_LOCALE as integer

property, DDE Mo, 15. Jul 2002
Mac OS Classic: Does nothing. Mac OS Carbon: Does nothing. Windows: Works.
Function: A constant for the format parameter.
Notes: Specifies the Windows locale format.

CF_METAFILEPICT as integer

property, DDE Mo, 15. Jul 2002
Mac OS Classic: Does nothing. Mac OS Carbon: Does nothing. Windows: Works.
Function: A constant for the format parameter.
Notes: Specifies the Windows metafile format.

CF_OEMTEXT as integer

property, DDE Mo, 15. Jul 2002
Mac OS Classic: Does nothing. Mac OS Carbon: Does nothing. Windows: Works.
Function: A constant for the format parameter.
Notes: Specifies the standard Windows original equipment manufacturer (OEM) text format.

CF_PALETTE as integer

property, DDE Mo, 15. Jul 2002
Mac OS Classic: Does nothing. Mac OS Carbon: Does nothing. Windows: Works.
Function: A constant for the format parameter.
Notes: Specifies the Windows palette format.

CF_PENDATA as integer

property, DDE Mo, 15. Jul 2002
Mac OS Classic: Does nothing. Mac OS Carbon: Does nothing. Windows: Works.
Function: A constant for the format parameter.
Notes: Specifies the Windows pen data format.

CF_RIFF as integer

property, DDE Mo, 15. Jul 2002
Mac OS Classic: Does nothing. Mac OS Carbon: Does nothing. Windows: Works.
Function: A constant for the format parameter.
Notes: Specifies the Resource Interchange File Format (RIFF) audio format.

CF_SYLK as integer

property, DDE Mo, 15. Jul 2002
Mac OS Classic: Does nothing. Mac OS Carbon: Does nothing. Windows: Works.
Function: A constant for the format parameter.
Notes: Specifies the Windows symbolic link format.

CF_TEXT as integer

property, DDE Mo, 15. Jul 2002
Mac OS Classic: Does nothing. Mac OS Carbon: Does nothing. Windows: Works.
Function: A constant for the format parameter.
Notes: Specifies the standard American National Standards Institute (ANSI) text format.

CF_TIFF as integer

property, DDE Mo, 15. Jul 2002
Mac OS Classic: Does nothing. Mac OS Carbon: Does nothing. Windows: Works.
Function: A constant for the format parameter.
Notes: Specifies the Tagged Image File Format (TIFF).

CF_UNICODETEXT as integer

property, DDE Mo, 15. Jul 2002
Mac OS Classic: Does nothing. Mac OS Carbon: Does nothing. Windows: Works.
Function: A constant for the format parameter.
Notes: Specifies the standard Windows Unicode text format.

CF_WAVE as integer

property, DDE Mo, 15. Jul 2002
Mac OS Classic: Does nothing. Mac OS Carbon: Does nothing. Windows: Works.
Function: A constant for the format parameter.
Notes: Specifies the wave audio format.

ClientTransaction(type as integer,topic as DDEString[, data as DDEBinaryData[, datatype as integer]]) as DDEBinaryData

method, DDE Mo, 15. Jul 2002
Mac OS Classic: Does nothing. Mac OS Carbon: Does nothing. Windows: Works.
Function: Runs a Transaction with the server.
Example:
// List all Excel Topics

dim d as DDE
dim s,topic as DDEString
dim g as DDEString
dim m as DDEBinaryData
dim t,enter,z as string
dim i,c as integer

list.deleteAllRows
d=new dde
if d.InitClient then
s=d.newDDEString("Excel")
topic=d.newDDEString("System")
if topic<>nil and s<>nil and d.connect(s,topic) then
g=d.newDDEString("Topics")
if g<>nil then
m=d.ClientTransaction(d.XTYP_REQUEST,g)
if m<>nil then
t=m.str
t=left(t,len(t)-1) // remove chr(0) at end
enter=chr(9)
c=countfields(t,Enter)
for i=1 to c
z=nthfield(t,enter,i)

list.addRow z
next
list.listindex=0
else
msgBox "Failed to transfer."
end if
else
msgBox "Fail to create second string."
end if
g=nil // must be released before close
else
msgBox "Fail to create connect."
end if
s=nil // must be released before close
d.close
else
msgBox "Fail to init for Client."
end if
Notes:
Use this ClientTransaction if the application returns a value or ClientTransactionBoolean if it returns a boolean.
Data and Datatype are optional. If no datatype is set, the datatype is set to the value of CF_TEXT.

ClientTransactionBoolean(type as integer,topic as DDEString[, data as DDEBinaryData[, datatype as integer]]) as Boolean

method, DDE Mo, 15. Jul 2002
Mac OS Classic: Does nothing. Mac OS Carbon: Does nothing. Windows: Works.
Function: Runs a Transaction with the server.
Notes:
Use this ClientTransaction if the application returns a value or ClientTransactionBoolean if it returns a boolean.
Data and Datatype are optional. If no datatype is set, the datatype is set to the value of CF_TEXT.

Close

method, DDE Mo, 15. Jul 2002
Mac OS Classic: Does nothing. Mac OS Carbon: Does nothing. Windows: Works.
Function: Closes the running connection.
Example:
if d<>nil then
d.close
d=nil
end if
Notes: RB seems to crash, if the object is not destroyed before application is quit.

Connect(appname as DDEString, topic as DDEString) as boolean

method, DDE Mo, 15. Jul 2002
Mac OS Classic: Does nothing. Mac OS Carbon: Does nothing. Windows: Works.
Function: Connects to the application for the given topic.
Example:
dim a,b as ddestring

d=new dde
if d.InitClient then
a=d.newDDEString(service.text)
b=d.newDDEString(topic.text)
if a<>nil and b<>nil then
if d.connect(a,b) then
msgBox "Connected."
return // ok, so leave before closing.
else
msgBox "Failed to connect."
end if
else
msgBox "Unable to make DDE Strings."
end if
d.close // failed

else
msgBox "Failed to initClient."
end if
Notes: Using nil for appname or topic you can try to connect to anyone who accepts.

DDE_FACK as integer

property, DDE Mo, 15. Jul 2002
Mac OS Classic: Does nothing. Mac OS Carbon: Does nothing. Windows: Works.
Function: A constant for the return parameter of some events.
Notes: Return DDE_FACK if everything was handled well.

DDE_FBUSY as integer

property, DDE Mo, 15. Jul 2002
Mac OS Classic: Does nothing. Mac OS Carbon: Does nothing. Windows: Works.
Function: A constant for the return parameter of some events.
Notes: Return DDE_FBUSY if your application is busy and can't currently handle the request.

DDE_FNOTPROCESSED as integer

property, DDE Mo, 15. Jul 2002
Mac OS Classic: Does nothing. Mac OS Carbon: Does nothing. Windows: Works.
Function: A constant for the return parameter of some events.
Notes: Return DDE_FNOTPROCESSED if something went wrong will processing this event.

InitClient as boolean

method, DDE Mo, 15. Jul 2002
Mac OS Classic: Does nothing. Mac OS Carbon: Does nothing. Windows: Works.
Function: Starts DDE, but only for Client stuff.

InitServer as boolean

method, DDE Mo, 15. Jul 2002
Mac OS Classic: Does nothing. Mac OS Carbon: Does nothing. Windows: Works.
Function: Starts DDE for client and server stuff.

LastError as integer

property, DDE Mo, 15. Jul 2002
Mac OS Classic: Does nothing. Mac OS Carbon: Does nothing. Windows: Works.
Function: The last error code.

NewDDEBinaryData(name as DDEString,data as memoryblock,offset as integer,length as integer,format as integer) as DDEBinaryData

method, DDE Mo, 15. Jul 2002
Mac OS Classic: Does nothing. Mac OS Carbon: Does nothing. Windows: Works.
Function: Creates a new binary data object.

NewDDEBinaryData(name as DDEString,data as string[,offset as integer,length as integer]) as DDEBinaryData

method, DDE Mo, 15. Jul 2002
Mac OS Classic: Does nothing. Mac OS Carbon: Does nothing. Windows: Works.
Function: Creates a new binary data object.
Notes: The offset and length is optional.

NewDDEString(ansistring as string) as DDEString

method, DDE Mo, 15. Jul 2002
Mac OS Classic: Does nothing. Mac OS Carbon: Does nothing. Windows: Works.
Function: Creates a new ANSI DDE string.
Example:
dim a as DDEString
a=d.newDDEString(service.text)
Notes: ANSI is the normal string encoding on Windows.

NewDDEStringUnicode(unicodestring as string) as DDEString

method, DDE Mo, 15. Jul 2002
Mac OS Classic: Does nothing. Mac OS Carbon: Does nothing. Windows: Works.
Function: Creates a new Unicode DDE string.
Example:
dim a as DDEString
a=d.NewDDEStringUnicode(service.text)
Notes: Currently this DDE Classes are only tested for ANSI Systems. And I'm not sure if REALbasic itself does handle Unicode correctly on Windows.

RegisterService(name as DDEString) as boolean

method, DDE Mo, 15. Jul 2002
Mac OS Classic: Does nothing. Mac OS Carbon: Does nothing. Windows: Works.
Function: Registers a service name.
Example:
dim s as ddestring

if d<>nil then
s=d.newDDEString(editfield1.text)

if s<>nil then
if d.registerService(s) then
msgBox "Registered."
else
msgBox "Register fails."
end if
else
msgBox "Failed on NewDDEString"
end if
else
msgBox "No DDE object!?"
end if

Timeout as integer

property, DDE Mo, 15. Jul 2002
Mac OS Classic: Does nothing. Mac OS Carbon: Does nothing. Windows: Works.
Function: Timeout in milliseconds.
Example: d.timeout=10000 // 10 Seconds
Notes: Default is 1000.

UnRegisterService(name as DDEString) as boolean

method, DDE Mo, 15. Jul 2002
Mac OS Classic: Does nothing. Mac OS Carbon: Does nothing. Windows: Works.
Function: Unregisters a service name.
Example:
dim s as ddestring

if d<>nil then
s=d.newDDEString(editfield1.text)

if s<>nil then
if d.UnRegisterService(s) then
msgBox "Unregistered."
else
msgBox "Unregister fails."
end if
else
msgBox "Failed on NewDDEString"
end if
else
msgBox "No DDE object!?"
end if

XTYP_EXECUTE as integer

property, DDE Mo, 15. Jul 2002
Mac OS Classic: Does nothing. Mac OS Carbon: Does nothing. Windows: Works.
Function: A constant for the type parameter of ClientTransaction and ClientTransactionBoolean.

XTYP_POKE as integer

property, DDE Mo, 15. Jul 2002
Mac OS Classic: Does nothing. Mac OS Carbon: Does nothing. Windows: Works.
Function: A constant for the type parameter of ClientTransaction and ClientTransactionBoolean.

XTYP_REQUEST as integer

property, DDE Mo, 15. Jul 2002
Mac OS Classic: Does nothing. Mac OS Carbon: Does nothing. Windows: Works.
Function: A constant for the type parameter of ClientTransaction and ClientTransactionBoolean.

Contact

Written 2002 by Christian Schmitz. Feel free to ask or report mistakes to realbasic@macsw.de.
Thanks.

This resource fork intentionally left blank ˇˇ